# $Id: PKGBUILD 82025 2013-01-05 19:31:17Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=postgis
pkgver=2.0.2
pkgrel=1
pkgdesc="Adds support for geographic objects to PostgreSQL"
arch=('i686' 'x86_64')
url="http://postgis.org/"
license=('GPL')
depends=('postgresql>=9.2' 'postgresql<9.3' 'proj' 'geos' 'gdal' 'json-c' 'libxml2')
changelog=$pkgname.changelog
options=('!libtool')
source=("http://postgis.org/download/${pkgname}-${pkgver}.tar.gz")
sha256sums=('57746d040080e624f3e81633a180d8a5fc16b0c035d94fe2c16306023ab1c391')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}

  ./configure --prefix=/usr
  make

  # Build utils (FS#25836)
  cd utils
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  cd utils
  make DESTDIR=${pkgdir} install
}
